import tornado.web
import tornado.ioloop
import tornado
import tornado.httpserver
from kg_server import get_app
port_name = 8181

if __name__ == '__main__':
    app = get_app()
    server = tornado.httpserver.HTTPServer(app)
    server.bind(port=port_name)   
    num_proc = 4
    server.start(num_proc)
    print("服务启动成功,监听端口http://127.0.0.1:{a}...".format(a=port_name))
    tornado.ioloop.IOLoop.current().start()
